#ifndef __NETWORK_PACKET_H
#define __NETWORK_PACKET_H

enum
{
	AM_COMPUTER_ID = 0,
	AM_HUB_ID = 1,
	AM_ALL_NODES = 2,
	AM_NODE_FIRST_ID = 10,
	CHANNEL_ID = 37
};

typedef enum {
	LIGHT_SENSOR = 0,
	LED_COMMAND = 1,

	SET_SAMPLE_INTERVAL = 2,
	/* Sets the samplin interval */

	SET_LIGHT_REPORT_THRESHOLD = 3,
	/* Sets the required threshold to report on a change in the light 
	 * reading */

	BAD_PACKET = 9
	/* A bad packet, typically used if the GameHub recieves an incomplete
	 * packet. Should never be sent from a source, only a relay.
 	 */
	 
} packet_type;

typedef nx_struct network_packet_t
{
	nx_uint8_t type; /* Cast to a packet_type */
	nx_uint8_t destination;
	nx_uint8_t source;
	nx_uint16_t data;
} network_packet_t;

#endif /* __NETWORK_PACKET_H */
